<%@ page import="testportal.Environ" %>



<div class="fieldcontain ${hasErrors(bean: environInstance, field: 'name', 'error')} ">
	<label for="name">
		<g:message code="environ.name.label" default="Name" />
		
	</label>
	<g:textField name="name" value="${environInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: environInstance, field: 'description', 'error')} ">
	<label for="description">
		<g:message code="environ.description.label" default="Description" />
		
	</label>
	<g:textField name="description" value="${environInstance?.description}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: environInstance, field: 'active', 'error')} ">
	<label for="active">
		<g:message code="environ.active.label" default="Active" />
		
	</label>
	<g:checkBox name="active" value="${environInstance?.active}" />
</div>

<div class="fieldcontain ${hasErrors(bean: environInstance, field: 'appInstances', 'error')} ">
	<label for="appInstances">
		<g:message code="environ.appInstances.label" default="App Instances" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${environInstance?.appInstances?}" var="a">
    <li><g:link controller="appInstance" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="appInstance" action="create" params="['environ.id': environInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'appInstance.label', default: 'AppInstance')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: environInstance, field: 'region', 'error')} required">
	<label for="region">
		<g:message code="environ.region.label" default="Region" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="region" name="region.id" from="${testportal.Region.list()}" optionKey="id" required="" value="${environInstance?.region?.id}" class="many-to-one"/>
</div>

